﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;


namespace Bll
{
    public class News
    {
        public static DataGroup MULTIPLE(string strCon, int pageSize, int pageIndex, string whereStr)
        {
            return new DataGroup(Dal.News.MULTIPLE(strCon, pageSize, pageIndex, whereStr));
        }

        public static DataTable Single(string strCon, int pkid)
        {
            return Dal.News.Single(strCon, pkid);
        }

        public static int Insert(string strCon,
                string txbNewsTitle,
                string txbNewsContent,
                string txbKeywords,
                string txbDescription)
        {
            return Dal.News.Insert(
                    strCon,
                    txbNewsTitle,
                    txbNewsContent,
                    txbKeywords,
                    txbDescription
            );
        }

        public static int Update(string strCon,
                string txbNewsTitle,
                string txbNewsContent,
                string txbKeywords,
                string txbDescription,
                int txbPKID)
        {
            return Dal.News.Update(
                    strCon,
                    txbNewsTitle,
                    txbNewsContent,
                    txbKeywords,
                    txbDescription,
                    txbPKID
            );
        }

        public static int Delete(string strCon, int pkid)
        {
            return Dal.News.Delete(strCon, pkid);
        }
    }
}
